GDK W32: More flexible modal operation mode
authorРуслан Ижбулатов <lrn1986@gmail.com>
Fri, 11 Aug 2017 07:00:41 +0000 (07:00 +0000)
committerРуслан Ижбулатов <lrn1986@gmail.com>
Sat, 2 Dec 2017 10:38:30 +0000 (10:38 +0000)
commit33de691d9faaf7ae7ab8dde3210ea0225218f954
treea9d4062127156194f6795aa37fb410b05080c360
parent323a601123c341886c39f55096d656c750f028a9
GDK W32: More flexible modal operation mode

Instead of using a boolean to indicate a modal operation being in progress,
use a set of flags, and allow these to be set and unset independently.

Specifically, this allows WM_CAPTURECHANGED handler to only act when a drag-move or
drag-resize modal operation is in progress, and ignore DND (which can also cause
WM_CAPTURECHANGED to be posted). This avoids a crash due to assertion failure when
OLE2 DND code tries to end a modal operation that was already ended by the WM_CAPTURECHANGED
handler.

(This commit is cherry-picked from the gtk-3-22 branch)

https://bugzilla.gnome.org/show_bug.cgi?id=786121
gdk/win32/gdkdevicemanager-win32.c
gdk/win32/gdkdnd-win32.c
gdk/win32/gdkevents-win32.c
gdk/win32/gdkglobals-win32.c
gdk/win32/gdkprivate-win32.h